package com.youlu.campus.common.utils;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

@Getter
@Setter
@Slf4j
public class AppContext {

    private static final ThreadLocal<AppContext> currContext = new ThreadLocal() {
        protected AppContext initialValue() {
            return new AppContext();
        }
    };

    public static AppContext current() {
        return currContext.get();
    }

    public static void release() {
        currContext.remove();
    }

    /**
     * unionid
     */
    private String unionid;
    /**
     * openId
     */
    private String openid;
    /**
     * 昵称
     */
    private String nick;

    private String name;
    /**
     * 手机号
     */
    private String  phone;
    /**
     * appId
     */
    private String appId;
    /**
     * dd id
     */
    private String dingId;
    /**
     * 数据库用户id
     */
    private String userId;
    /**
     * 钉钉存储的用户id
     */
    private String ddUserId;
}
